import request from '@/config/axios'

// 护理内容 VO
export interface ContentVO {
  id: number // 主键
  name: string // 护理项名称
  price: number // 护理项价格
  descr: string // 护理项描述
  isAdd: number // 是否增值服务 
  status: number // 状态
  remark:String
}

// 护理内容 API
export const ContentApi = {
  // 查询护理内容分页
  getContentPage: async (params: any) => {
    return await request.get({ url: `/yyzx/content/page`, params })
  },

  // 查询护理内容详情
  getContent: async (id: number) => {
    return await request.get({ url: `/yyzx/content/get?id=` + id })
  },

  // 新增护理内容
  createContent: async (data: ContentVO) => {
    return await request.post({ url: `/yyzx/content/create`, data })
  },

  // 修改护理内容
  updateContent: async (data: ContentVO) => {
    return await request.put({ url: `/yyzx/content/update`, data })
  },

  // 删除护理内容
  deleteContent: async (id: number) => {
    return await request.delete({ url: `/yyzx/content/delete?id=` + id })
  },

  // 导出护理内容 Excel
  exportContent: async (params) => {
    return await request.download({ url: `/yyzx/content/export-excel`, params })
  },
}
